﻿using GMap.NET.WindowsForms;
using GMap.NET;
using System.Drawing;

namespace BusStationClient
{    
    public  class StationMarker : GMapMarker
    {
        private Bitmap _b;
        private string _name;
        private PointLatLng _p;

        public StationMarker(PointLatLng pp, Bitmap bitmap, string name) 
           : base(pp)
       {
           // Pen = new Pen(Brushes.Blue, 5);
           //btsIcon =  Image.FromFile("C:\\red.gif");
           Size = new System.Drawing.Size(20, 20);//图钉的大小
           Offset = new System.Drawing.Point(0, 0);//图像的位置

            this._b = bitmap;
            this._name = name;
            this._p = pp;

       }
 
        //画基站的图像
       public override void OnRender(Graphics g)
       {
      
           g.DrawImageUnscaled(_b, LocalPosition.X-15, LocalPosition.Y-15);
           //g.DrawString(_name, new Font("黑体", 8.0f,FontStyle.Regular), Brushes.Green,(float)(this.LocalPosition.X-22),(float)(this.LocalPosition.Y-30));

       }
    }
   
}
